<?php

/**
 * @author PeoneEr
 * @method sql()
 */
require_once "core/db.php";

class Mrequests1 extends DB {

    private $_query;

    protected function getCountRequests() {
        /**
         *  кол-во запросов
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT COUNT(*) FROM `personal_requests` WHERE `toId` = '$_SESSION[id]' AND `status` = '0'";
        $countGet = DB::getInstance()->sql($this->_query);
        return mysql_result($countGet, 0);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
